/**
 * 
 */
package br.com.sc.persistencia.dao.impl;

import java.util.List;

import javax.persistence.Query;

import br.com.sc.negocio.entidade.UF;
import br.com.sc.persistencia.dao.SCDao;
import br.com.sc.persistencia.dao.UFDao;

/**
 * @author Flavio Canedo
 *
 */
public class UFDaoImpl extends SCDao<UF> implements UFDao{

	/**
	 * @param clazz
	 */
	public UFDaoImpl() {
		super(UF.class);
	}

	/**
	 * @see br.com.itc.persistencia.dao.UFDao#listarUFs()
	 */
	@SuppressWarnings("unchecked")
	public List<UF> listarUFs() {
		StringBuilder comando = new StringBuilder();
		comando.append(criarComandoPesquisa(clazz));

		Query query = getEntityManager().createQuery(comando.toString());
		return (List<UF>) query.getResultList();
	}

}
